<?php
/**
 * Clase de la tabla Unidades.
 */
class Variables_Model_DbTable_Rangos extends Zend_Db_Table_Abstract {
	/** Table name */
	protected $_name = 'rangos';
	protected $_primary = 'codrango';
	protected $_sequence = 'seq_rangos';
//	protected $_rowClass = 'App_Audit_Row';
	
	public function getRangos($datos=array()) {
		$select = $this->select()
		               ->from(array('r'=>'rangos'),array("*"))
		               ->order("r.codrango");
		$select->setIntegrityCheck(false);
		
		if (isset($datos["codescala"])){
		    $select->where("r.codescala=?",$datos["codescala"]);
		}

		
		return $select->query()->fetchAll();
	}
	
	
}
